home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 4 / Meeting Pearls Vol. IV (1996)(GTI - Schatztruhe)[!].iso / Pearls / etech / GALer20 / Install < prev    next >
Text File  |  1996-04-07  |  13KB  |  454 lines

  1. ; $VER: GALer Install, Copyright ©1996 Christian Habermann
  2. ;
  3. ;     GALer, All Rights Reserved.
  4. ;
  5. ;     GALer ©1991-1996 Christian Habermann
  6. ;     Reqtools ©1991-1995 Nico François
  7. ;     MUI ©1992-1994 Stefan Stuntz
  8.  
  9.  
  10. (delopts "oknodelete" "force" "askuser")
  11.  
  12.  
  13.  
  14. ;**************************************************************************
  15. ;** English strings, this is the default language                        **
  16. ;**************************************************************************
  17.  
  18.     (set #introduction
  19.         (cat "This program installs \n\n GALer\n\n"
  20.              "on your harddisk.\n\n"
  21.              "Select \"Proceed\" to continue or\n"
  22.             "\"Abort Install\" to cancel."
  23.         )
  24.     )
  25.  
  26.  
  27.     (set #badOS "\n Sorry, this package requires OS V2.04 or better.\n")
  28.  
  29.  
  30.     (set #dest_dir
  31.         (cat "Please select a directory in which GALer\nshould be installed.\n"
  32.              "A subdirecory \"GALer\" will be created automatically!"
  33.         )
  34.     )
  35.  
  36.  
  37.     (set #dest_dir_help
  38.         (cat "\nSelect a directory on your hard disk in which you want to get "
  39.              "GALer installed. In this directory a directory \"GALer\" will be "
  40.              "created, in which the files will be copied."
  41.         )
  42.     )
  43.  
  44.  
  45.     (set #already_installed
  46.         (cat "\nA version of GALer is already installed. "
  47.              "Do you want to install GALer V2.0."
  48.         )
  49.     )
  50.  
  51.     (set #already_installed_help
  52.         (cat "\nIf you select \"Yes\", "
  53.              "the existing version will be replaced with GALer V2.0.\n"
  54.              "If you select \"No\", the installation will be aborted."
  55.         )
  56.     )
  57.  
  58.  
  59.     (set #install_components
  60.         (cat "\nPlease select which components you want to install."
  61.         )
  62.     )
  63.  
  64.     (set #install_components_help
  65.         (cat "\nHere you can select which components of GALer you want to install"
  66.              "The components are:\n\n"
  67.              "GALer and manual: The programs and the manual will be installed.\n\n"
  68.              "Examples: Some examples will be installed.\n\n"
  69.              "PCB-Layout: The Gerber- and PostScript files of a PCB will be installed.\n\n"
  70.              "Source-Code: The whole source-code of the GALer project will be installed."
  71.         )
  72.     )
  73.  
  74.  
  75.     (set #inst_GALer
  76.         (cat "GALer and manual"
  77.         )
  78.     )
  79.  
  80.     (set #inst_examples
  81.         (cat "Examples"
  82.         )
  83.     )
  84.  
  85.     (set #inst_layout
  86.         (cat "PCB-Layout"
  87.         )
  88.     )
  89.  
  90.     (set #inst_source
  91.         (cat "Source-Code"
  92.         )
  93.     )
  94.  
  95.  
  96.  
  97.     (set #ask_dvi_manual
  98.         (cat "\nDo you want to install a DVI version (TeX) of the manual?"
  99.         )
  100.     )
  101.  
  102.     (set #ask_dvi_manual_help
  103.         (cat "\nTo use the DVI version of the manual you need TeX (e.g. PasTeX). "
  104.              "Without this you can't display the manual."
  105.         )
  106.     )
  107.  
  108.  
  109.  
  110.     (set #readme_file "ReadMe")
  111.     (set #hardware_file "Hardware1.3E")
  112.     (set #manual_guide_file "Doc/GALer_E.guide")
  113.     (set #manual_dvi_file "")
  114.  
  115.  
  116.  
  117. ;**************************************************************************
  118. ;** German strings                                                       **
  119. ;**************************************************************************
  120.  
  121. (if (= @language "deutsch") (
  122.  
  123.     (set #introduction
  124.         (cat "Mit diesem Programm wird \n\n GALer\n\n auf eine "
  125.              "Festplatte installiert.\n\n"
  126.              "Drücken Sie \"Proceed\", um weiterzumachen oder\n"
  127.              "\"Abort Install\", um die Installation abzubrechen."
  128.         )
  129.     )
  130.  
  131.  
  132.     (set #badOS "\n Sorry, dieses Programm benötigt OS V2.04 oder höher.\n")
  133.  
  134.  
  135.     (set #dest_dir
  136.         (cat "Bitte wählen Sie das Verzeichnis aus, in das GALer\ninstalliert werden soll!\n"
  137.              "Ein Unterverzeichnis \"GALer\" wird automatisch erzeugt!"
  138.         )
  139.     )
  140.  
  141.     (set #dest_dir_help
  142.         (cat "\nWählen Sie einfach das Verzeichnis aus, in das GALer installiert werden soll. "
  143.              "In diesem Verzeichnis wird dann ein Unterverzeichnis Namens \"GALer\" erzeugt, "
  144.              "in das das Program und andere Dateien kopiert werden."
  145.         )
  146.     )
  147.  
  148.  
  149.     (set #already_installed
  150.         (cat "\nEine Version von GALer ist bereits installiert. "
  151.              "Soll diese durch GALer 2.0 ersetzt werden?"
  152.         )
  153.     )
  154.  
  155.     (set #already_installed_help
  156.         (cat "\nGALer ist bereits installiert. Wenn Sie \"Yes\" anwählen, "
  157.              "wird GALer V2.0 über Ihre alte Installation kopiert.\n"
  158.              "Wenn Sie \"No\" anwählen, wird die Installation abgebrochen."
  159.         )
  160.     )
  161.  
  162.  
  163.     (set #install_components
  164.         (cat "\nBitte wählen Sie aus, was alles installiert werden soll."
  165.         )
  166.     )
  167.  
  168.     (set #install_components_help
  169.         (cat "\nHier können Sie auswählen, welche Komponenten installiert werden "
  170.              "sollen. Im einzelnen sind das: \n\n"
  171.              "GALer mit Anleitung: Es wird GALer und die dazugehörige Anleitung "
  172.              "installiert.\n\n"
  173.              "Beispiele: Es werden verschiedene Beispiele installiert.\n\n"
  174.              "PCB-Layout: Es werden die Gerber- und PostScript-Files eines "
  175.              "Platinen-Layouts installiert.\n\n"
  176.              "Source-Code: Es wird der komplette Source-Code des GALer-Projekts "
  177.              "installiert."
  178.         )
  179.     )
  180.  
  181.  
  182.     (set #inst_GALer
  183.         (cat "GALer mit Anleitung"
  184.         )
  185.     )
  186.  
  187.     (set #inst_examples
  188.         (cat "Beispiele"
  189.         )
  190.     )
  191.  
  192.     (set #inst_layout
  193.         (cat "PCB-Layout"
  194.         )
  195.     )
  196.  
  197.     (set #inst_source
  198.         (cat "Source-Code"
  199.         )
  200.     )
  201.  
  202.  
  203.  
  204.     (set #ask_dvi_manual
  205.         (cat "\nEs gibt eine DVI-Version (LaTeX) der Anleitung. "
  206.              "Wenn Sie die Möglichkeit haben, DVI-Files anzuzeigen "
  207.              "oder auszudrucken, wird dringend empfohlen, die DVI-Version "
  208.              "zu installieren. Diese Anleitung ist mit vielen erklärenden "
  209.              "Bildern versehen, die im Guide-File fehlen.\n"
  210.              "Soll die DVI-Version der Anleitung installiert werden? "
  211.              "Wenn ja, lesen bitte nach dem Installations-Prozeß unbedingt "
  212.              "das LiesMich-File im Doc-Verzeichnis, bevor Sie die DVI-Version "
  213.              "anzeigen bzw. ausdrucken (WICHTIG!!!)"
  214.         )
  215.     )
  216.  
  217.     (set #ask_dvi_manual_help
  218.         (cat "\nBei DVI-Files handelt es sich um spezielle Text-Files, die "
  219.              "mit dem Schriftsatzprogramm TeX erstellt wurden. Diese Files "
  220.              "können nur mit einem speziellen Anzeigeprogramm betrachtet werden "
  221.              "(z.B. ShowDVI). Wenn Sie eine TeX-Version installiert haben (z.B. "
  222.              "PasTeX), so wird die Installation der DVI-Version der Anleitung "
  223.              "empfohlen. Die Qualität der DVI-Version ist erheblich besser "
  224.              "als die der \"normalen\" Text-Version."
  225.         )
  226.     )
  227.  
  228.  
  229.     (set #readme_file "LiesMich")
  230.     (set #hardware_file "Hardware1.3D")
  231.     (set #manual_guide_file "Doc/GALer_D.guide")
  232.     (set #manual_dvi_file "Doc/GALer_D.dvi")
  233.     (set #manual_doc_dvi_file "Doc/LiesMich")
  234.  
  235. ))
  236.  
  237.  
  238.  
  239.  
  240. ;**************************************************************************
  241. ;** Main - start with actions                                            **
  242. ;**************************************************************************
  243.  
  244. (message #introduction)
  245. (welcome)
  246.  
  247. (complete 0)
  248.  
  249.  
  250.  
  251. (if (< (/ (getversion) 65536) 37)           ; sure that we are running under
  252.     (                                       ; OS V2.04 or better?
  253.         (message #badOS)
  254.  
  255.         (exit (quiet))
  256.     )
  257. )
  258.  
  259.  
  260.  
  261.  
  262. (set target                                 ; select the destination directory
  263.     (askdir
  264.         (prompt #dest_dir)
  265.         (help   #dest_dir_help)
  266.         (default "Sys:")                    ; SYS: does exist always
  267.     )
  268. )
  269.  
  270.  
  271. (set @default-dest target)                  ; set the default destination
  272.  
  273.  
  274.  
  275. (if (exists (tackon target "GALer"))        ; does GALer already exist?
  276.     (  message (#already_installed)
  277.                (help #already_installed_help)   ; yes, then make it public
  278.     )
  279.     (  makedir (tackon target "GALer")          ; no, then create the directory
  280.     )
  281. )
  282.  
  283.  
  284.  
  285. (set inst (askoptions (prompt #install_components)        ; ask what to install
  286.                       (help   #install_components_help)
  287.                       (default -1)
  288.                       (choices  #inst_GALer
  289.                                 #inst_examples
  290.                                 #inst_layout
  291.                                 #inst_source)
  292.      )
  293. )
  294.  
  295.  
  296.  
  297.                             ; ok, now we know what to install, so do it...
  298.  
  299. (if (BITAND inst 1)                               ; install program and manual?
  300.     (
  301.         (copyfiles (source "")                      ; install programms
  302.                    (dest (tackon target "GALer"))
  303.                    (choices "GALer"
  304.                             "GALerTest"
  305.                             #readme_file
  306.                             #hardware_file)
  307.                    (infos)
  308.         )
  309.  
  310.         (complete 25)
  311.  
  312.  
  313.         (if (NOT (exists (tackon target "GALer/Doc")) )
  314.             (makedir (tackon target "GALer/Doc"))
  315.         )
  316.  
  317.         (copyfiles (source #manual_guide_file)              ; install GALer.guide
  318.                    (dest (tackon target "GALer/Doc"))
  319.                    (newname "GALer.guide")
  320.                    (infos)
  321.         )
  322.  
  323.         (copyfiles (source "Doc.info")
  324.                    (dest (tackon target "GALer"))
  325.         )
  326.  
  327.         (complete 35)
  328.  
  329.  
  330.         (if (<> #manual_dvi_file "")               ; is there a dvi-file?
  331.             (
  332.                 (set result (askbool (prompt #ask_dvi_manual)
  333.                                      (help   #ask_dvi_manual_help))
  334.                 )
  335.  
  336.                 (if (= result 1)                    ; install GALer.dvi
  337.                     (
  338.                         (copyfiles (source #manual_dvi_file)
  339.                                    (dest (tackon target "GALer/Doc"))
  340.                                    (newname "GALer.dvi")
  341.                                    (infos))
  342.  
  343.                         (copyfiles (source #manual_doc_dvi_file)
  344.                                    (dest (tackon target "GALer/Doc"))
  345.                                    (newname "LiesMich")
  346.                                    (infos))
  347.                     )
  348.                 )
  349.             )
  350.         )
  351.  
  352.         (complete 48)
  353.  
  354.  
  355.         (copyfiles (source "s")                     ; install config-file
  356.                    (dest "s:")
  357.                    (choices "GALer.config")
  358.                    (infos)
  359.                    (nogauge)
  360.         )
  361.  
  362.  
  363.         (if (= @language "deutsch")                 ; install catalogs
  364.             (
  365.                 (if (exists "LOCALE:" (noreq))
  366.                     (copyfiles (source "Catalogs/deutsch")
  367.                                (dest "LOCALE:catalogs/deutsch")
  368.                                (all)
  369.                                (infos)
  370.                     )
  371.  
  372.                 )
  373.             )
  374.         )
  375.  
  376.  
  377.         (copylib (source "libs/reqtools.library")       ; install libraries
  378.                  (dest "libs:")
  379.         )
  380.  
  381.  
  382.  
  383.     )
  384. )
  385.  
  386. (complete 50)
  387.  
  388.  
  389. (if (BITAND inst 2)                                 ; install examples?
  390.     (
  391.         (if (NOT (exists (tackon target "GALer/Examples")) )
  392.             (makedir (tackon target "GALer/Examples"))
  393.         )
  394.  
  395.         (copyfiles (source "Examples.info")
  396.                    (dest (tackon target "GALer"))
  397.         )
  398.  
  399.         (copyfiles (source "Examples")
  400.                    (dest (tackon target "GALer/Examples"))
  401.                    (all)
  402.                    (infos)
  403.         )
  404.     )
  405. )
  406.  
  407. (complete 60)
  408.  
  409.  
  410.  
  411. (if (BITAND inst 4)                                 ; install PCB?
  412.     (
  413.         (if (NOT (exists (tackon target "GALer/Layout")))
  414.             (makedir (tackon target "GALer/Layout"))
  415.         )
  416.  
  417.         (copyfiles (source "Layout.info")
  418.                    (dest (tackon target "GALer"))
  419.         )
  420.  
  421.         (copyfiles (source "Layout")
  422.                    (dest (tackon target "GALer/Layout"))
  423.                    (all)
  424.                    (infos)
  425.         )
  426.     )
  427. )
  428.  
  429. (complete 75)
  430.  
  431.  
  432.  
  433. (if (BITAND inst 8)                                 ; install source code?
  434.     (
  435.         (if (NOT (exists (tackon target "GALer/Source")))
  436.             (makedir (tackon target "GALer/Source"))
  437.         )
  438.  
  439.         (copyfiles (source "Source.info")
  440.                    (dest (tackon target "GALer"))
  441.         )
  442.  
  443.         (copyfiles (source "Source")
  444.                    (dest (tackon target "GALer/Source"))
  445.                    (all)
  446.                    (infos)
  447.         )
  448.     )
  449. )
  450.  
  451. (complete 100)
  452.  
  453.  
  454.